package com.house.web.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.house.biz.HouseBiz;
import com.house.entity.House;

@Controller
public class DetailController {
	@Autowired
	private HouseBiz houseBiz;
	
	@RequestMapping("/detail")
	public String detail(Model model,int id){
		House house=houseBiz.getHouseById(id);
		model.addAttribute("house",house);
		return "detail";
	}
	
}
